package at.ac.univie.zsu.aguataplan.property;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.annotation.Value;

import at.ac.univie.zsu.aguataplan.util.EnvironmentHandler;

/**
 * encapsulate "system.properties" for easier use
 * 
 * @author gerry
 * 
 */
@Configurable
public class SystemProperties {

	@Value(value = "#{systemPropertiesProp.version}")
	private String version;
	@Value(value = "#{systemPropertiesProp.vendor}")
	private String vendor;
	@Value(value = "#{systemPropertiesProp.homepage}")
	private String homepage;

	@Value(value = "#{systemPropertiesProp.logDir}")
	private String logDir;
	@Value(value = "#{systemPropertiesProp.logConfig}")
	private String logConfig;

	@Value(value = "#{systemPropertiesProp.ftpServerAddress}")
	private String ftpServerAddress;
	@Value(value = "#{systemPropertiesProp.ftpServerPort}")
	private int ftpServerPort;
	@Value(value = "#{systemPropertiesProp.ftpServerUser}")
	private String ftpServerUser;
	@Value(value = "#{systemPropertiesProp.ftpServerPassword}")
	private String ftpServerPassword;
	@Value(value = "#{systemPropertiesProp.ftpServerDir}")
	private String ftpServerDir;

	@Value(value = "#{systemPropertiesProp.videoPrefix}")
	private String videoPrefix;
	@Value(value = "#{systemPropertiesProp.videoPostfix}")
	private String videoPostfix;
	@Value(value = "#{systemPropertiesProp.videoPostfixType}")
	private String videoPostfixType;
	@Value(value = "#{systemPropertiesProp.videoExtension}")
	private String videoExtension;

	@Value(value = "#{systemPropertiesProp.dirVideo}")
	private String dirVideo;
	@Value(value = "#{systemPropertiesProp.dirBin}")
	private String dirBin;
	@Value(value = "#{systemPropertiesProp.dirDocs}")
	private String dirDocs;
	@Value(value = "#{systemPropertiesProp.dirEtc}")
	private String dirEtc;
	@Value(value = "#{systemPropertiesProp.dirExport}")
	private String dirExport;
	@Value(value = "#{systemPropertiesProp.dirIcon}")
	private String dirIcon;
	@Value(value = "#{systemPropertiesProp.dirLib}")
	private String dirLib;
	@Value(value = "#{systemPropertiesProp.dirLicense}")
	private String dirLicense;
	@Value(value = "#{systemPropertiesProp.dirLog}")
	private String dirLog;
	@Value(value = "#{systemPropertiesProp.dirVlc}")
	private String dirVlc;

	// ----------------------------------------------------
	// CONSTRUCTOR
	// ----------------------------------------------------

	public SystemProperties() {
	}

	// ----------------------------------------------------
	// GETTER & SETTER
	// ----------------------------------------------------

	public String getFtpServerAddress() {
		return ftpServerAddress;
	}

	public void setFtpServerAddress(String ftpServerAddress) {
		this.ftpServerAddress = ftpServerAddress;
	}

	public int getFtpServerPort() {
		return ftpServerPort;
	}

	public void setFtpServerPort(int ftpServerPort) {
		this.ftpServerPort = ftpServerPort;
	}

	public String getFtpServerUser() {
		return ftpServerUser;
	}

	public void setFtpServerUser(String ftpServerUser) {
		this.ftpServerUser = ftpServerUser;
	}

	public String getFtpServerPassword() {
		return ftpServerPassword;
	}

	public void setFtpServerPassword(String ftpServerPassword) {
		this.ftpServerPassword = ftpServerPassword;
	}

	public String getDirEtc() {
		return EnvironmentHandler.adaptPath(dirEtc);
	}

	public void setDirEtc(String dirEtc) {
		this.dirEtc = dirEtc;
	}

	public String getDirLog() {
		return EnvironmentHandler.adaptPath(dirLog);
	}

	public void setDirLog(String dirLog) {
		this.dirLog = dirLog;
	}

	public String getDirVlc() {
		return EnvironmentHandler.adaptPath(dirVlc);
	}

	public void setDirVlc(String dirVlc) {
		this.dirVlc = dirVlc;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getVendor() {
		return vendor;
	}

	public void setVendor(String vendor) {
		this.vendor = vendor;
	}

	public String getHomepage() {
		return homepage;
	}

	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}

	public String getFtpServerDir() {
		return ftpServerDir;
	}

	public void setFtpServerDir(String ftpServerDir) {
		this.ftpServerDir = ftpServerDir;
	}

	public String getDirVideo() {
		return EnvironmentHandler.adaptPath(dirVideo);
	}

	public void setDirVideo(String dirVideo) {
		this.dirVideo = dirVideo;
	}

	public String getDirBin() {
		return EnvironmentHandler.adaptPath(dirBin);
	}

	public void setDirBin(String dirBin) {
		this.dirBin = dirBin;
	}

	public String getDirDocs() {
		return EnvironmentHandler.adaptPath(dirDocs);
	}

	public void setDirDocs(String dirDocs) {
		this.dirDocs = dirDocs;
	}

	public String getDirIcon() {
		return EnvironmentHandler.adaptPath(dirIcon);
	}

	public void setDirIcon(String dirIcon) {
		this.dirIcon = dirIcon;
	}

	public String getDirLib() {
		return EnvironmentHandler.adaptPath(dirLib);
	}

	public void setDirLib(String dirLib) {
		this.dirLib = dirLib;
	}

	public String getDirLicense() {
		return EnvironmentHandler.adaptPath(dirLicense);
	}

	public void setDirLicense(String dirLicense) {
		this.dirLicense = dirLicense;
	}

	public String getVideoPrefix() {
		return videoPrefix;
	}

	public void setVideoPrefix(String videoPrefix) {
		this.videoPrefix = videoPrefix;
	}

	public String getVideoPostfix() {
		return videoPostfix;
	}

	public void setVideoPostfix(String videoPostfix) {
		this.videoPostfix = videoPostfix;
	}

	public String getVideoPostfixType() {
		return videoPostfixType;
	}

	public void setVideoPostfixType(String videoPostfixType) {
		this.videoPostfixType = videoPostfixType;
	}

	public String getVideoExtension() {
		return videoExtension;
	}

	public void setVideoExtension(String videoExtension) {
		this.videoExtension = videoExtension;
	}

	public String getLogDir() {
		return EnvironmentHandler.adaptPath(logDir);
	}

	public void setLogDir(String logDir) {
		this.logDir = logDir;
	}

	public String getLogConfig() {
		return logConfig;
	}

	public void setLogConfig(String logConfig) {
		this.logConfig = logConfig;
	}

	public String getDirExport() {
		return EnvironmentHandler.adaptPath(dirExport);
	}

	public void setDirExport(String dirExport) {
		this.dirExport = dirExport;
	}

}
